import * as constants from '../Constants'
import { get, GET_CKPHOTO_LIST } from '../../service/api'

export interface GetCkphotoList {
  type: constants.GetCkphotoList
  payload: Promise<any>
}
export interface GetCkphotoList_PENDING {
  type: constants.GetCkphotoList_PENDING
  payload: Promise<any>
}
export interface GetCkphotoList_FULFILLED {
  type: constants.GetCkphotoList_FULFILLED
  payload: any
}
export interface GetCkphotoList_Type {
  type: constants.GetCkphotoList_Type
  payload: number
}


export type CkphotoAction = GetCkphotoList | 
  GetCkphotoList_FULFILLED | 
  GetCkphotoList_PENDING |
  GetCkphotoList_Type

export function recordType(param: number): GetCkphotoList_Type {
  return {
    type: constants.GetCkphotoList_Type,
    payload: param
  }
}

export function getCkphotoList(param: any): GetCkphotoList {
  return {
    type: constants.GetCkphotoList,
    payload: get(GET_CKPHOTO_LIST, param)
  }
}